package com.lx.pc.restful.sysarea;

import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSON;
import com.lx.pc.domain.vo.sysarea.SysareaVo;
import com.lx.pc.restful.BaseController;
import com.lx.pc.service.sysarea.ISysareaService;

@Controller
@RequestMapping(name = "sysarea")
public class SysareaController extends BaseController{
	
	@Resource(name = "sysareaService")
	private ISysareaService sysareaService;
	
	@RequestMapping("/sysareaList.do")
	@ResponseBody
    public  String sysareaList(SysareaVo v,Integer page,Integer size) throws IOException {
        Map<String,Object> result = new HashMap<String, Object>();
        v.setParentCode("0");
        List<SysareaVo> list = sysareaService.findBySysareaList(v);
        result.put("sysarea", list);
        return JSON.toJSONString(result);
    }
}
